package com.bw.controller;

import com.bw.service.GmallService;
import com.sugar.SugarUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class GmallController {
//    注入业务层
    @Autowired
    GmallService gmallService;

    @RequestMapping("/sumTotal")
    public Map  sumTotal(String nowDate){
        Double value = gmallService.sumTotal(nowDate);
        return SugarUtil.getFlipNumberData(value);
    }
}
